namespace SampleModel;

class Config
{
    protected static configList = null;

    public static function register(array! configList) -> void
    {
        let self::configList = configList;
    }

    public static function get(string! configName) -> array
    {
        var config, configList;

        let configList = self::configList;

        if fetch config, configList[configName] {
            return config;
        }
        return [];
    }

    public static function set(string! configName, array! config) -> void
    {
        let self::configList[configName] = config;
    }

    public static function delete(string! configName) -> void
    {
        var configList;
        let configList = self::configList;

        unset(configList[configName]);

        let self::configList = configList;
    }
}